#pragma once
#ifndef PARTICLEENGINE_H
#define PARTICLEENGINE_H

#include "DXUT.h"

struct PARTICLE_VERTEX
{
    D3DXVECTOR3 pos;
    D3DXVECTOR3 vel;
    float		Timer;
    UINT		Type;
};

class ParticleEngine {
private:
    // D3D11
    // Shaders
    ID3D11VertexShader*					m_pVSRenderParticle11;
	ID3D11GeometryShader*				m_pGSRenderParticle11;
    ID3D11PixelShader*					m_pPSRenderParticle11;

	ID3D11Buffer*						m_pConstantBuffer11;
	ID3D11InputLayout*					m_pParticleVertexLayout11;

	ID3D11Buffer*                       m_pParticleStart11;
	ID3D11Buffer*                       m_pParticleStreamTo11;
	ID3D11Buffer*                       m_pParticleDrawFrom11;
	ID3D11ShaderResourceView*           m_pParticleTexRV11;
public:

	void    OnD3D11DestroyDevice();
	HRESULT OnD3D11CreateDevice( ID3D11Device* pd3dDevice );
};

#define MAX_PARTICLES 30000

#endif